package com.hqj.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author 黄啟军
 * @version 1.0
 * @date 2020/7/23 0023
 */
@ApiModel(description = "Resource",value = "Resource")
@TableName(value="resource")
@Data
public class ResourceEntity implements Serializable {

    @ApiModelProperty(value = "",required = false)
    @TableId(value = "id", type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @ApiModelProperty(value = "资源网站名称",required = false)
    @Column(name = "name")
    private String name;

    @ApiModelProperty(value = "封面地址",required = false)
    @Column(name = "img_url")
    private String imgUrl;

    @ApiModelProperty(value = "简介",required = false)
    @Column(name = "synopsis")
    private String synopsis;

    @ApiModelProperty(value = "0未删除1已删除",required = false)
    @Column(name = "is_delete")
    private Integer isDelete;
    @ApiModelProperty(value = "",required = false)
    @Column(name = "create_by")
    private Date createBy;
    @ApiModelProperty("父级id")
    @Column(name="parent_id")
    private Long parentId;
    @ApiModelProperty("网址")
    @Column(name="w_url")
    private String wUrl;
    @ApiModelProperty("子类集合")
    @TableField(exist = false)
    private List<ResourceEntity> resourceList;
}
